package com.example.es.template;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class ElasticSearchType {

    public static final Map<String, String> TEXT ;
    public static final Map<String, String> KEYWORD;
    public static final Map<String, String> DATE;
    public static final Map<String, String> INTEGER;
    public static final Map<String, String> LONG;
    public static final Map<String, String> DOUBLE;
    public static final Map<String, String> IP;

    static {
        Map<String,String> temp = new HashMap<>(4);
        temp.put("type", "text");

        TEXT = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "keyword");

        KEYWORD = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "date");

        DATE = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "integer");

        INTEGER = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "long");

        LONG = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "double");

        DOUBLE = Collections.unmodifiableMap(new HashMap<>(temp));
        temp.put("type", "ip");

        IP = Collections.unmodifiableMap(new HashMap<>(temp));
    }
}
